// Latest Code Snippet
function recentSnippet(a) {
    var b = a.feed.entry,
        c, sk = "",
        ct = document.getElementById('latest-snippet-container');
    sk = '<div class="snippet-outer"><strong>Snippet Terakhir</strong><ul>';
    for (var i = 0; i < 7; i++) {
        for (var j = 0; j < b[i].link.length; j++) {
            if (b[i].link[j].rel == 'alternate') {
                c = b[i].link[j].href;
                break;
            }
        }
        sk += '<li>&#10070; <a href="' + c + '" title="' + b[i].title.$t + '">' + b[i].title.$t + '</a></li>';
    }
    sk += '</ul></div>';
    ct.innerHTML = sk;
}

// Callback Script
function getScript(url) {
    var s = document.createElement('script');
    s.type = "text/javascript";
    s.src = url;
    document.body.appendChild(s);
}
getScript("http://kode-blogger.blogspot.com/feeds/posts/summary?alt=json-in-script&orderby=updated&max-results=7&callback=updatedPosts");
getScript("http://kode-blogger.blogspot.com/feeds/posts/summary?alt=json-in-script&orderby=published&max-results=7&callback=recentSnippet");
getScript("http://kode-blogger.blogspot.com/feeds/comments/default?alt=json-in-script&max-results=7&callback=latestComments");
